package com.huc.controller;


import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.huc.common.Result;
import com.huc.entity.Users;
import com.huc.service.UsersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author JET
 * @since 2020-07-07
 */
@RestController
@RequestMapping
@Api(tags = "用户接口")
@ApiSort(value = 1)
public class UsersController {
    @Autowired
    UsersService usersService;

    @PostMapping("tenant/register")
    @ApiOperation("用户注册")
    public Result register(@RequestBody Users users){
        boolean save = usersService.save(users);
        return Result.succ(save);
    }

}

